/*! jQuery-ui-Slider-Pips - v1.10.7 - 2015-08-20 * Copyright (c) 2015 Simon Goellner ; Licensed MIT */ !function(a){"use strict";var b={pips:function(b){function c(b){var c,d,e,f,g,h=[],i=0;if(q&&q.length){for(e=l.element.slider("values"),f=a.map(e,function(a){return Math.abs(a-b)}),g=Math.min.apply(Math,f),c=0;ce[1]?i=h[1]:bq[0]&&ii||"max"===l.options.range&&i>p)&&(f+=" ui-slider-pip-inrange");return h="horizontal"===l.options.orientation?"left: "+d:"bottom: "+d,''+t.formatLabel(c)+""}var g,h,i,j,k,l=this,m="",n=l._valueMin(),o=l._valueMax(),p=l._value(),q=l._values(),r=(o-n)/l.options.step,s=l.element.find(".ui-slider-handle"),t={first:"label",last:"label",rest:"pip",labels:!1,prefix:"",suffix:"",step:r>100?Math.floor(.05*r):1,formatLabel:function(a){return this.prefix+a+this.suffix}};if("object"!==a.type(b)&&"undefined"!==a.type(b))return void("destroy"===b&&d());a.extend(t,b),l.options.pipStep=Math.round(t.step),l.element.off(".selectPip").addClass("ui-slider-pips").find(".ui-slider-pip").remove();var u={single:function(b){this.resetClasses(),k.filter(".ui-slider-pip-"+this.classLabel(b)).addClass("ui-slider-pip-selected"),l.options.range&&k.each(function(c,d){var e=a(d).children(".ui-slider-label").data("value");("min"===l.options.range&&b>e||"max"===l.options.range&&e>b)&&a(d).addClass("ui-slider-pip-inrange")})},range:function(b){for(this.resetClasses(),g=0;gb[0]&&ei;i++)i%l.options.pipStep===0&&(m+=f(i));for(m+=f("last"),l.element.append(m),k=l.element.find(".ui-slider-pip"),j=a._data(l.element.get(0),"events").mousedown&&a._data(l.element.get(0),"events").mousedown.length?a._data(l.element.get(0),"events").mousedown:l.element.data("mousedown-handlers"),l.element.data("mousedown-handlers",j.slice()),h=0;hi&&(i=g),i>h&&(i=h),j&&j.length)for(e=0;eh&&(j[e]=h);if(f.element.addClass("ui-slider-float").find(".ui-slider-tip, .ui-slider-tip-label").remove(),m.handle)for(k=d(j&&j.length?j:[i]),e=0;e'+m.formatLabel(k[e])+""));m.pips&&f.element.find(".ui-slider-label").each(function(b,c){var e,f,g=a(c),h=[g.data("value")];e=m.formatLabel(d(h)[0]),f=a(''+e+"").insertAfter(g)}),"slide"!==m.event&&"slidechange"!==m.event&&"slide slidechange"!==m.event&&"slidechange slide"!==m.event&&(m.event="slidechange slide"),f.element.off(".sliderFloat").on(m.event+".sliderFloat",function(b,c){var e="array"===a.type(c.value)?c.value:[c.value],f=m.formatLabel(d(e)[0]);a(c.handle).find(".ui-slider-tip").html(f)})}};a.extend(!0,a.ui.slider.prototype,b)}(jQuery);